﻿using IQIGame.Onigao.Framework;
using UnityEditor;

namespace IQIGame.Onigao.Game.Editors
{
    [CustomEditor(typeof(ExCanvas))]
    [CanEditMultipleObjects]
    public class ExCanvasEditor : Editor
    {
        ExCanvas exCanvas;
        private void OnEnable()
        {
            this.exCanvas = (ExCanvas)target;
        }

        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            if (this.exCanvas.isCanAddOrderByParent)
            {
                int v = EditorGUILayout.IntSlider("Add Order Value", this.exCanvas.mAddOrderValue, -40, 50);
                this.exCanvas.mAddOrderValue = (short)v;
            }
        }
    }
}
